<?php
	defined('RUN') or die('No access');
	
	class ConfigModel
	{
		private $tables='config';
		public function getById($id,$fields='*')
		{
			$condition = array(
					'field' => 'id',
					'value' => $id
				);

			$cat = Model::getData($this->tables, $fields, $condition);
			if ($cat)
				return $cat[0];

			return FALSE;
		}
		public function update($data, $id)
		{
			$condition = array(
					'field' => 'id',
					'value' => $id
				);
			
			return Model::updateData($this->tables, $data, $condition);
		}
	}
